<form action="/admin/supplier/custom-save" id="plate-add-form" data-toggle="ajaxform" data-options="{closeCurrent:true}">
    <div class="bjui-row">
        <input type="hidden" name="id" value="{{$info['id']}}">
        <div class="bjui-row col-2">
            <label class="row-label">供应商名称</label>
            <div class="row-input required">
                <input type="text" name="supplier_name" id="supplier_name" data-rule="required" value="{{$info['supplier_name']}}">
            </div>
        </div>
        <div class="bjui-row col-2">
            <label class="row-label">供应商头像</label>
            <div class="row-input">
                <input type="file" data-name="avatars_id" data-id="avatars_id" data-toggle="webuploader" data-options="
                {
                    pick: {label: '点击选择图片'},
                    server: 'admin/photo/upload',
                    upname:'avatars_id',
                    fileNumLimit: 1,
                    formData: {_token : '{{ csrf_token() }}',path_type:3},
                    required: true,
                    uploaded: '{{$info['avatars_url']}}',
                    initUploaded: '{{$info['avatars_id']}}',
                    basePath: '',
                    accept: {
                        title: '图片',
                        extensions: 'jpg,png',
                        mimeTypes: '.jpg,.png'
                    }
                }">
            </div>
        </div>
        <div class="bjui-row col-2">
            <label class="row-label">供应商分类</label>
            <div class="row-input">
                <select name="supplier_level" id="supplier_level" data-toggle="selectpicker">
                    @foreach($levels as $val)
                        <option value="{{$val['id']}}" @if($info['supplier_level'] == $val['id']) selected @endif >{{$val['title']}}</option>
                    @endforeach
                </select>
            </div>
        </div>
        <div class="bjui-row col-2">
            <label class="row-label">供应商电话</label>
            <div class="row-input">
                <input type="text" name="supplier_tel" id="supplier_tel" value="{{$info['supplier_tel']}}">
            </div>
        </div>
        <div class="bjui-row col-2">
            <label class="row-label">省市区</label>
            <div class="row-input">
                <select name="province_id" id="province_id" data-nextselect="#city_id" data-toggle="selectpicker" data-rule="required" data-refurl="admin/address/ajaxAreaList?type=2&value={value}">
                    <option value="">请选择</option>
                    @foreach ($provinceList as $val)
                        <option value="{{$val['provinceID']}}" @if ($info['province_id'] == $val['provinceID']) selected @endif >{{$val['province']}}</option>
                    @endforeach
                </select>
                <select name="city_id" id="city_id" data-nextselect="#area_id" data-toggle="selectpicker" data-rule="required" data-refurl="admin/address/ajaxAreaList?type=3&value={value}">
                    <option value="">请选择</option>
                    @if (!empty($info['city_id']) && $info['city_id']>0)
                        <option value="{{$info['city_id']}}" selected>{{$info['city_name']}}</option>
                    @endif
                </select>
                <select name="area_id" id="area_id" data-rule="required">
                    <option value="">请选择</option>
                    @if (!empty($info['area_id']) && $info['area_id']>0)
                        <option value="{{$info['area_id']}}" selected>{{$info['area_name']}}</option>
                    @endif
                </select>
            </div>
        </div>
        <div class="bjui-row col-2">
            <label class="row-label">详细地址</label>
            <div class="row-input">
                <input type="text" name="supplier_address" id="supplier_address" value="{{$info['supplier_address']}}">
            </div>
        </div>
        <div class="bjui-row col-2">
            <label class="row-label">供应商代表</label>
            <div class="row-input">
                <input type="text" name="contact_person" id="contact_person" value="{{$info['contact_person']}}">
            </div>
        </div>
        <div class="bjui-row col-2">
            <label class="row-label">供应商代表电话</label>
            <div class="row-input">
                <input type="text" name="contact_phone" id="contact_phone" value="{{$info['contact_phone']}}">
            </div>
        </div>
        <div class="bjui-row col-2">
            <label class="row-label">供应商代表地址</label>
            <div class="row-input">
                <input type="text" name="contact_address" id="contact_address" value="{{$info['contact_address']}}">
            </div>
        </div>
        <div class="bjui-row col-2">
            <label class="row-label">排序</label>
            <div class="row-input">
                <input type="text" name="sort_id" id="sort_id" size="" value="{{$info['sort_id']}}">
            </div>
        </div>
        <div class="bjui-row col-2">
            <div class="row-input">
                <label class="row-label"></label>
                <button type="submit" class="btn-default" data-icon="save">保存</button>
                <button type="button" class="btn-close" data-icon="close">取消</button>
            </div>
        </div>
    </div>
</form>
